/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - resource
// Copyright( c) 2014.  All Rights Reserved
//
// File:		AEStringUtils.h
// Author:		Gianluca Belardelli
// Date:		02/10/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AESTRINGUTILS_H_
#define _AESTRINGUTILS_H_

class AEStringUtils
{
// Methods
public:
	/// \brief Returns the index of the last '.' at the end of a path (after all / or \). Returns -1 if there is no such position.
	AE_DLLIMPEXP static AEINT32 GetExtensionPos( const char *lpFilename );

	/// \brief Returns a pointer to the extension (including the '.') in filename. "" if there is no extension.
	AE_DLLIMPEXP static const char *GetExtension( const char *lpFilename );

	/// \brief Checks whether the given file has the desired extension. szExtension must start with a '.'
	AE_DLLIMPEXP static AEBOOL32 HasExtension( const char *lpFile, const char *lpExtension );

	/// \brief Copies the filename without the file extension to 'res'.
	AE_DLLIMPEXP static AEBOOL32 GetFilenameNoExt( const char *lpFilename, char *lpResult );

	/// \brief Returns a pointer to the substring that represents the file name including its extension.
	AE_DLLIMPEXP static const char *GetFilenameFromPath( const char *lpPathName );
};

#endif // _AESTRINGUTILS_H_
